package com.example.btcontroller;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TextView;

public class data_dis_activity extends AppCompatActivity {

    public static TextView tv_in; //接收显示句柄
    public static ScrollView scrollView; //翻页句柄

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_data_dis);

        scrollView = findViewById(R.id.receiveScrolView);
        tv_in = findViewById(R.id.data_dis_Text);

//清空按钮响应
        Button clrButton = (Button) findViewById(R.id.clrButton);
        clrButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                MainActivity.mBlue_Rx_Buffer = " ";
                tv_in.setText("");
            }
        });
//清空按钮响应
        Button ret_Button = (Button) findViewById(R.id.ret_Button);
        ret_Button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
    //关闭程序掉用处理部分,恢复实时采集读取
    public void onDestroy(){
        super.onDestroy();
        MainActivity.uCSB_PAR.data_dis_activity = 0;
    }
}